import request from '@/utils/request'

// 获取文章分类列表
export const getCateList = () => {
  return request.get('/my/cate/list')
}

// 添加分类
export const addCategoryAPI = data => {
  return request.post('/my/cate/add', data)
}

// 删除分类
export const deleteCategoryAPI = id => {
  return request.delete('/my/cate/del', { params: { id } })
}

// 编辑分类
export const updateCategoryAPI = data => {
  return request.put('/my/cate/info', data)
}

export const addArticleAPI = fd => {
  return request.post('/my/article/add', fd)
}

export const getArticleAPI = params => {
  return request.get('/my/article/list', { params: params })
}
